package org.gexperiments.graph;

public class Node {
	private String ip;
	private String userLabel;

	public Node() {

	}

	public Node(String ip, String userLabel) {
		super();
		this.ip = ip;
		this.userLabel = userLabel;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public String getUserLabel() {
		return userLabel;
	}

	public void setUserLabel(String userLabel) {
		this.userLabel = userLabel;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((ip == null) ? 0 : ip.hashCode());
		result = prime * result + ((userLabel == null) ? 0 : userLabel.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Node other = (Node) obj;
		if (ip == null) {
			if (other.ip != null)
				return false;
		} else if (!ip.equals(other.ip))
			return false;
		if (userLabel == null) {
			if (other.userLabel != null)
				return false;
		} else if (!userLabel.equals(other.userLabel))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return String.valueOf(userLabel);
	}

}
